package com.lipaluma.io;

import com.lipaluma.field.mapper.mapping.MappingInfo;

/**
 * Class that represents a Row of the entry File
 * @author Mario
 */
public interface Row extends Cloneable {

	/**
	 * Extract a value as a String in the row at the column index
	 * 
	 * @param index column index
	 * @return the value extracted as a String
	 */
//	String extractValueOnIndex(int index);

	/**
	 * Write a value as a String in the row at the column index
	 * 
	 * @param index column index
	 * @return the value extracted as a String
	 */
//	void writeValueOnRow(Object value, int index);


	/**
	 * Extract a value as a String in the row at the location defined by the {@link MappingInfo}
	 * 
	 * @param info informations of mapping
	 * @return the value extracted as a String
	 */
	String extractValue(MappingInfo info);

	/**
	 * Write a value as a String in the row at the location defined by the {@link MappingInfo}
	 * 
	 * @param value value to write
	 * @param info information of mapping
	 */
	void writeValue(Object value, MappingInfo info);
	
	
	String[] toArray();
}
